<template>
  <div id="MyInvitation">
    <el-tabs class="listdata">
      <el-tab-pane label="全部">
        <InvitationList :status="5" @ViewState="refrush"></InvitationList>
      </el-tab-pane>
      <el-tab-pane label="未查看">
        <InvitationList :status="0" @ViewState="refrush"></InvitationList>
      </el-tab-pane>
      <el-tab-pane label="已同意">
        <InvitationList :status="2" @ViewState="refrush"></InvitationList>
      </el-tab-pane>
      <el-tab-pane label="已拒绝">
        <InvitationList :status="3" @ViewState="refrush"></InvitationList>
      </el-tab-pane>
      <el-tab-pane label="已忽略">
        <InvitationList :status="4" @ViewState="refrush"></InvitationList>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
  import { postDataToServer } from '../../assets/js/post.js'
  import InvitationList from '@/components/personInBox/InvitationList'

  export default {
    name: 'MyInvitation',
    data () {
      return {}
    },
    created () {

    },
    methods: {
      getPath (path) {
        if (path !== '') {
          this.$router.push({'path': path})
        }
      },
      refrush (state) {
        if (state === true) {
          this.$router.go(0)
        }
      }
    },
    components: {
      InvitationList
    }
  }
</script>

<style scoped>
  #MyInvitation {
    margin-top: 2em;
  }

  .listdata {
    margin-top: 1em;
    min-height: 25em;
  }
</style>
